import React, { useEffect, useState } from 'react'
import { NavBar, Space, Toast } from 'antd-mobile'
import { useNavigate } from 'react-router-dom'
import { Popup, Cell } from 'react-vant'
import { Typography, Divider } from 'react-vant'
import './index.css'
function index() {
    const navigate = useNavigate()
    const [visible, setVisible] = useState(false)
    const back = () =>
        Toast.show({
            content: navigate(-1),
            duration: 1000,
        })

    const content =
        '便宜没好货'
    return (
        <div>
            <NavBar onBack={back}>微脉问医1元义诊活动</NavBar>


            <div className='oneBox1'>
                <img src="../src/assets/457.jpg" alt="" onClick={() => setVisible(true)} className='imagebOX1' />
                <Popup visible={visible} onClose={() => setVisible(false)}>
                    <div style={{ padding: '30px 50px', }}>
                        <p>活动规则说明</p>
                        1. <span className='onesnap1'>问诊前请如实填写就诊人信息</span><br />
                        2. <span className='onesnap1'>问诊前请如实填写就诊人信息</span><br />
                        3. <span className='onesnap1'>问诊前请如实填写就诊人信息</span><br />
                        4. <span className='onesnap1'>问诊前请如实填写就诊人信息</span><br />
                        5. <span className='onesnap1'>问诊前请如实填写就诊人信息</span><br />
                        6. <span className='onesnap1'>问诊前请如实填写就诊人信息</span><br />
                        <button className='oneBTN1' onClick={() => setVisible(false)}>我知道了</button>
                    </div>
                </Popup>
            </div>


            <div className='oneBox2'>
                <Typography.Text
                    ellipsis={{
                        rows: 2,
                        collapseText: '收起',
                        expandText: '展开',
                    }}
                >
                    {content}
                </Typography.Text>
            </div>
        </div>
    )
}

export default index